import Mock from 'mockjs';

export function mock() {
    // 获取订单列表
    Mock.mock(/manage\/order/, 'post', {
        status: 0,
        message: 'OK',
        data: [
            {
                id: 1,
                nickname: '昵称',
                user_id: 12,
                // 'prepay'|'good'|'package'
                type: 'prepay',
                title: '经典婚纱摄影套餐',
                price: 1800,
                original_price:123,
                link_id:123,
                cover: '',
                referrer_id:123,
                referrer_level:23,
                referrer_nickname:123,
                // 'init' | 'close' | 'paid' | 'refund'
                status: 'init',
                is_prepay: 0,
                is_finish: 0,
                created_at:'2019-01-01 15:12:23',
                detail: [], //同订单详情
                gift: [],
            },
        ],
    });

    // 交易额排行榜
    Mock.mock(/manage\/rank/, 'get', {
        status: 0,
        message: 'OK',
        data: [
            {
                nickname: '昵称',
                avatar: 'http://www.baidu.com',
                score: 3400,
                referrer: '张三',
            },
        ],
    });

    // 奖金列表
    Mock.mock(/manage\/rebate_list/, 'post', {
        status: 0,
        message: 'OK',
        data: [
            {
                nickname: 'wqb',
                avatar: 1243,
                tilte: '不是吧',
                shop: '商店名',
                created_at: '2019-01-01 12:23:12',
                price: 123,
                referrer: '张三',
                rebate: 124,
                identity: '城市合伙人',
            },
        ],
    });

    // 获取数据看板数据
    Mock.mock(/manage\/rebate_list/, 'post', {
        status: 0,
        message: 'OK',
        data: [
            {
                user_id: 123,
                nickname: 123,
                avatar: 'http://www.baidu.com',
                shop_id: 123,
                shop: '店铺名',
                identity: '城市合伙人',
                referrer: '推荐人',
                position: '前台', 
                order_number: 123,
                rebate: 12445,
            },
        ],
    });
}
